<?php 
	include_once "include/commons/IncludeWrapper.php";
	
	$action = Scope::loadVar("action");
	
	switch ($action) {
		case "login" :
			$action = new UsuarioLoginAction(false);
			$action->execute();
			break;
		case "logout" :
			$action = new UsuarioLogoutAction(true);
			$action->execute();
			break;
		case "cadastro" :
			Util::redirect("CadastroUsuario.php?action=carrega");
			break;		
	}
?>	
<?php include "include/util/header.php" ?>
<div id="content">
<form action="login.php" method="post" name="login">
<input type="hidden" name="action" value="login">
<table width="100%" height="100%">
	<tr>
		<td width="100%" height="10%" align="center" valign="middle">
			<?php Util::validateRequest(); ?>
		</td>
	</tr>
	<tr>
		<td width="100%" height="90%" align="center" valign="middle">
			<table border="0">
				<tr>
					<td>
						E-mail
					</td>
					<td>
						<input type="text" name="email" value="marciobarroso@gmail.com">
					</td>
				</tr>
				<tr>
					<td>
						Senha
					</td>
					<td>
						<input type="password" name="senha" value="minhasenha">
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<input type="reset" value="Limpar">&nbsp;<input type="submit" value="Logar">
					</td>
				</tr>
			</table>
			<a href="#">Esqueci minha senha</a>
			<a href="login.php?action=cadastro">Registrar</a>
		</td>
	</tr>
</table>
</form>
<?php include "include/util/footer.php" ?>